CREATE TABLE [dbo].[tb_ColaDeTramitesEnEspera]
(
[idTramiteEspera] [int] NOT NULL IDENTITY(1, 1),
[Senal] [int] NOT NULL,
[Tramite] [int] NOT NULL,
[Activacion] [datetime] NULL,
[Responsable] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tb_ColaDeTramitesEnEspera] ADD CONSTRAINT [PK_tb_ColaDeTramitesEnEspera] PRIMARY KEY NONCLUSTERED  ([idTramiteEspera]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tb_ColaDeTramitesEnEspera] WITH NOCHECK ADD CONSTRAINT [FK_tb_ColaDeTramitesEnEspera_tb_Usuarios] FOREIGN KEY ([Responsable]) REFERENCES [dbo].[tb_Usuarios] ([idUsuario])
GO
ALTER TABLE [dbo].[tb_ColaDeTramitesEnEspera] ADD CONSTRAINT [FK_tb_ColaDeTramitesEnEspera_tb_SenalesDeEspera] FOREIGN KEY ([Senal]) REFERENCES [dbo].[tb_SenalesDeEspera] ([idSenalEspera])
GO
ALTER TABLE [dbo].[tb_ColaDeTramitesEnEspera] WITH NOCHECK ADD CONSTRAINT [FK_tb_ColaDeTramitesEnEspera_tb_TramitesDocumentos] FOREIGN KEY ([Tramite]) REFERENCES [dbo].[tb_TramitesDocumentos] ([idTramite])
GO
